import React from 'react';
import {formatMsgByCn} from '@/utils/localeUtils';
import {Button, Result} from "antd";
import history from 'umi/router'
import {isFunction} from "lodash-es";
import PageBg from "./PageBg";

export default (props) => (
  <PageBg>
    {/*<iframe src="./1.html" frameborder="0"></iframe>*/}
    <Result
      status="403"
      title="403"
      subTitle="Sorry, you are not authorized to access this page."
      extra={<Button onClick={() => {
        if (isFunction(props.onGoBack)) {
          props.onGoBack();
        } else {
          history.replace('/');
        }
      }} type="primary">{formatMsgByCn('返回')}</Button>}
    />
  </PageBg>
)
